﻿
namespace WebRSSBuilder.Web
{
    using System;
    using System.Collections.Generic;
    using System.ComponentModel;
    using System.ComponentModel.DataAnnotations;
    using System.Data.Objects.DataClasses;
    using System.Linq;
    using System.ServiceModel.DomainServices.Hosting;
    using System.ServiceModel.DomainServices.Server;


    // The MetadataTypeAttribute identifies aspnet_RolesMetadata as the class
    // that carries additional metadata for the aspnet_Roles class.
    [MetadataTypeAttribute(typeof(aspnet_Roles.aspnet_RolesMetadata))]
    public partial class aspnet_Roles
    {

        // This class allows you to attach custom attributes to properties
        // of the aspnet_Roles class.
        //
        // For example, the following marks the Xyz property as a
        // required property and specifies the format for valid values:
        //    [Required]
        //    [RegularExpression("[A-Z][A-Za-z0-9]*")]
        //    [StringLength(32)]
        //    public string Xyz { get; set; }
        internal sealed class aspnet_RolesMetadata
        {

            // Metadata classes are not meant to be instantiated.
            private aspnet_RolesMetadata()
            {
            }

            public Guid ApplicationId { get; set; }
        
            public string Description { get; set; }

            public EntityCollection<File> Files { get; set; }
           
            public string LoweredRoleName { get; set; }
            [Key]
            public Guid RoleId { get; set; }
            [Required]
            public string RoleName { get; set; }
        }
    }

    // The MetadataTypeAttribute identifies FileMetadata as the class
    // that carries additional metadata for the File class.
    [MetadataTypeAttribute(typeof(File.FileMetadata))]
    public partial class File
    {

        // This class allows you to attach custom attributes to properties
        // of the File class.
        //
        // For example, the following marks the Xyz property as a
        // required property and specifies the format for valid values:
        //    [Required]
        //    [RegularExpression("[A-Z][A-Za-z0-9]*")]
        //    [StringLength(32)]
        //    public string Xyz { get; set; }
        internal sealed class FileMetadata
        {

            // Metadata classes are not meant to be instantiated.
            private FileMetadata()
            {
            }
            [Include]
            
            public aspnet_Roles aspnet_Roles { get; set; }
            [Key]
            public int FileID { get; set; }
            [Required]
            [DisplayName("File Name")]
            public string FileName { get; set; }
            [Required]
            [DisplayName("File URL")]
            public string FileURL { get; set; }

            [Required]
            [DefaultValue(null)]
            [DisplayName("Role")]
            public Nullable<Guid> RoleID { get; set; }
        }
    }
}
